﻿using System;
using System.Runtime.Serialization;
using System.Security.Permissions;

namespace T.FAS.Runtime.Action.SPI
{
    public class ActionExecuteExceptionMsg
    {
        public const string ActionNotExistErrorMsg = "当前不是有效的Action元数据,当前元数据为{0}，请检查元数据信息是否发布完全";
        public const string MetadataNull = "空";

        public const string ActionRelatedCDONotExistsErrorMsg = "未能获取到Action元数据{0}关联的CDO信息，请检查元数据信息是否发布完全";
        public static string GetActionNotExistErrorMsg(string actionCode)
        {
            string content = string.IsNullOrEmpty(actionCode) ? MetadataNull : actionCode;
            return string.Format(ActionNotExistErrorMsg,content);
        }

        public static string GetActionRelatedCDONotExistsErrorMsg(string actionCode)
        {
            return string.Format(ActionRelatedCDONotExistsErrorMsg,actionCode);
        }

    }
}
